from django.contrib import admin
from .models import Author,Book
# Register your models here.
class BookManager(admin.ModelAdmin):
    list_display = ['id','title','pub','market_price','isActive']
    list_display_links = ['id','title']
    list_filter = ['pub','isActive']
    search_fields = ['title']
    list_editable = ['pub']

class AuthorManager(admin.ModelAdmin):
    list_display = ['id','name','age']
    list_display_links = ['id']
    list_editable = ['age']


admin.site.register(Book,BookManager)
admin.site.register(Author,AuthorManager)
